package Work1;

import Accient.Punish;

public class Car {
    public  String userName;                      // 谁开车
    public  String carId;                           //  车牌号
    public  String  carName;                         //什么汽车（名字）
    public  int     productionDay;                   //生产日期
    public  int     endDay;                          //报废日期
    public  Car(){

    }
    public Car(String userName){
        this.userName=userName;
    }
   /* public void manage(Driver driver, Punish punish){
        System.out.println(driver.driverName+"驾驶"+this.carName+"受到"+punish.accidentType);
    }    */
    public  void subScore (Driver driver, Punish punish){
        System.out.println(driver.driverName+driver.driverGender+punish.accidentType);

    }




    public static void main (String [] args){

        Driver driver1=new Driver("大明","男");
       // Driver driver=new Driver("驾驶员1");
        Punish punish=new Punish("超速处罚");



        Car car=new Car();
        car.carId="123456789";
        car.carName="大本";
       // car.manage(driver,punish);
        car.subScore(driver1,punish);

    }



}
